import { Cell, Radio } from "@nutui/nutui-react-taro";
import { View } from "@tarojs/components";
import { useState } from "react";
import PersonalRegistration from "./components/PersonalRegistration";
import StoreRegistration from "./components/StoreRegistration";

const Register = () => {
  const [value, setValue] = useState("1");
  return (
    <View className="at-article">
      <Cell
        style={{
          display: "flex",
          justifyContent: "center",
          paddingTop: 6,
          paddingBottom: 6
        }}
      >
        <Radio.Group
          value={value}
          direction="horizontal"
          onChange={(val) => {
            setValue(val);
          }}
        >
          <Radio shape="button" value="1">
            个人注册
          </Radio>
          <Radio shape="button" value="2">
            门店注册
          </Radio>
        </Radio.Group>
      </Cell>

      {value === "1" ? <PersonalRegistration /> : <StoreRegistration />}
    </View>
  );
};
export default Register;
